Skip to main content

All Questions

2votes
2answers
250views

Infinite 2d block world (2d minecraft) with chunk system, physics and slower loading

Follow up from this question. I have added a slower loading system that allows the main game to run faster but I still get under 30 fps with caves even if I allow the player to outrun the loading. I ...
coder's user avatar
3votes
5answers
2kviews

How do I speed up this simulation program

This is a program to solve a differential equation numerically using Euler method. As of now, it is very slow, and I need to run 10000 Monte Carlo simulations. The differential equation is called ...
Jonathan Wick's user avatar
3votes
1answer
103views

3ph 2l inverter simulation with SPWM

Here is a code for a simple model of three phase two level inverter with constant DC voltage source and three phase RL load. ...
ppinha's user avatar
4votes
2answers
174views

NumPy script to convert BGR to HSL and back

This is a NumPy script that converts BGR arrays to HSL arrays and back, without using OpenCV. Input and output values are arrays of 3 dimensions with values ranging from 0 to 1, the shape of the ...
Ξένη Γήινος's user avatar
3votes
1answer
162views

Solve an option pricing PDE in Python - Part 1 [closed]

The Github repository NM-Heston solves call option prices under the Heston 2-factor model using ADI splitting schemes. I am adapting the code to price options under the 3-factor Heston-Hull-White ...
Ruan's user avatar
  • 111
1vote
1answer
141views

Further optimizing the ISING model

I've implemented the 2D ISING model in Python, using NumPy and Numba's JIT: ...
Amirhossein Rezaei's user avatar
3votes
1answer
136views

Create a forecast matrix from time series samples

I would like to create a matrix of delay from a time series. For example, given y = [y_0, y_1, y_2, ..., y_N] and W = 5 I need to create this matrix: ...
graille's user avatar
4votes
1answer
105views

Dataframe transformation to numpy ndarray takes ages to complete

I would like to transform my dataframe into an array of fixed-sized chunks from each unique segment. Specifically, I would like to transform the ...
super_ask's user avatar
3votes
1answer
835views

Using Numba works slower than not using it for my Python code

I thought this community is better place to ask my question so I ask here rather than at StackOverflow. Recently, I learned that Numba can make Python function ...
Senna's user avatar
5votes
1answer
202views

compare between two labels /objects -dominance rules

I have a function dominates() that seems to be the bottleneck of my algorithm (after profiling it). the function is as follows: ...
sos's user avatar
  • 161
2votes
1answer
69views

Resource reservation system

I'm using a function to determine if resources can be used again or not. This is the numpy array I'm using. ...
Mounir Hafsa's user avatar
1vote
1answer
50views

Pandas : Apply Merge operations from a column

I have a data frame, which contains three columns: ...
Ayodhyankit Paul's user avatar
6votes
1answer
124views

Code optimisation: Converting dataframe to numpy's ndarray

I am working with a dataframe of over 21M rows. ...
arilwan's user avatar
1vote
1answer
114views

Getting the square of the difference between many points in a NumPy array

I have an array with 40000 numbers that are floats or ints. I need to perform some calculation. To do this I have used nested for loop, but the code is really slow. Can I use something instead of ...
Tanvir's user avatar
4votes
1answer
168views

Code for wireless communication work

I need some pointers on how I can speed up my code, as of now it is incredible slow for larger inputs. The way the code works is that the file Loc_Circle_50U.txt contains the true locations of 50 ...
user3656142's user avatar

153050per page
close